// Copyright (c) 2007 Robin Boerdijk. All rights reserved.
//
// This software is licensed under the terms of the Microsoft Reciprocal License as described 
// in the file LICENSE.txt, which you should have received as part of this distribution. The 
// license terms are also available at http://www.opensource.org/licenses/ms-rl.html.

#include "wtkpc.h"

#include "wtk/ControlBox.h"

namespace wtk
{
	ControlBox::ControlBox(Control &control, long horizontalElasticiy, long verticalElasticity)
		: m_control(control)
		, m_horizontalElasticity(horizontalElasticiy)
		, m_verticalElasticity(verticalElasticity)
	{
	}

	SIZE ControlBox::CalculateMinimumContentSize()
	{
		return m_control.GetMinimumSize();
	}

	long ControlBox::CalculateHorizontalElasticity()
	{
		return m_horizontalElasticity;
	}

	long ControlBox::CalculateVerticalElasticity()
	{
		return m_verticalElasticity;
	}

	void ControlBox::LayoutContent(const POINT &position, const SIZE &size)
	{
		m_control.position = position;
		m_control.size = size;
	}
}
